package com.dongbing.demo.modules.system.enity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;

/**
 * @author  MrDong
 * @create  2021/6/24 9:25
 * @desc    SysRole实体类
 **/
@Data
@EqualsAndHashCode(callSuper = true)
public class SysRole extends BaseEntity{

    private static final long serialVersionUID = 1L;

    //@NotBlank 和 @Validated 搭配使用 NotBlank标明在实体类的字段上 Validated用在controller的接口方法的传参位置
    @NotBlank(message = "角色名称不能为空")
    private String name;

    @NotBlank(message = "角色编码不能为空")
    private String code;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private List<Long> menuIds = new ArrayList<>();
}
